//
//  KFDInvestmentCommunityManager.h
//  
//
//  Created by JIRENTIANXIANG on 6/28/15.
//
//

#import <Foundation/Foundation.h>
#import "KFDClient.h"

@interface KFDInvestmentCommunityManager : NSObject

+(KFDInvestmentCommunityManager*)sharedManager;

-(NSURLSessionTask*)uploadPicture:(UIImage*)picture successHandler:(KFDUploadInvestmentCommunityPostPictureSuccessHandler)successHandler failureHandler:(KFDRequestFailureHandler)failureHandler;

-(NSURLSessionTask*)publishPostWithContent:(NSString*)content pictures:(NSArray*)pictures successHandler:(KFDPublishPostSuccessHandler)successHandler failureHandler:(KFDRequestFailureHandler)failureHandler;

-(NSURLSessionTask*)praisePost:(NSString*)postId successHandler:(KFDPraiseInvestmentCommunityPostSuccessHandler)successHandler failureHandler:(KFDRequestFailureHandler)failureHandler;

-(NSURLSessionTask*)cancelPraisePost:(NSString*)postId successHandler:(KFDCancelPraiseInvestmentCommunityPostSuccessHandler)successHandler failureHandler:(KFDRequestFailureHandler)failureHandler;

-(NSURLSessionTask*)commentPost:(NSString*)postId userId:(NSString*)userId content:(NSString*)content successHandler:(KFDCommentICPostSuccessHandler)successHandler failureHandler:(KFDRequestFailureHandler)failureHandler;

@end

//----------------------------------------------------------------------------------

typedef void(^KFDICManagerIllegalInputHandler)(NSString* message);

@interface KFDInvestmentCommunityManager (BusinessRules)

-(BOOL)checkContent:(NSString*)content illegalInputHandler:(KFDICManagerIllegalInputHandler)handler;
-(BOOL)checkComment:(NSString*)comment illegalInputHandler:(KFDICManagerIllegalInputHandler)handler;

@end
